Skip to content

Add separate headless service for ZooKeeper statefulset#649

Merged
lhotari merged 15 commits intoapache:masterfrom
lhotari:lh-zk-headless
Feb 20, 2026
Merged

Add separate headless service for ZooKeeper statefulset#649
lhotari merged 15 commits intoapache:masterfrom
lhotari:lh-zk-headless

Conversation

@lhotari
Copy link
Member

@lhotari lhotari commented Feb 20, 2026

Previously there was a single service which would connect to unready pods (publishNotReadyAddresses: true). It's better to have 2 services: 1 with cluster ip and another "headless" (clusterIP: None) with publishNotReadyAddresses: true.
When Zookeeper clients connect, they would use the cluster ip service that connects to a health pod. The headless service is only used for zookeeper-to-zookeeper communications since it's used in the statefulset as the service name and will determine the hostnames for the pods.

The benefit of this change is that brokers and bookies won't try to connect to a ZK pod that is failing or hasn't started up.

@lhotari lhotari merged commit 57e2aec into apache:master Feb 20, 2026
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant